home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML Authority.sea / XML Authority / Required / Samples / UML / lift_state.xml < prev    next >
Encoding:
Extensible Markup Language  |  2000-05-03  |  2.0 KB  |  79 lines  |  [TEXT/CWIE]

  1. <?xml version="1.0"?>
  2. <!DOCTYPE Model SYSTEM "uml.dtd">
  3.  
  4. <Model>
  5. <Package NAME = "Lift">
  6.   <StatechartDiagram name = "Lift">
  7.  
  8.     <PseudoState kind = "initial">
  9.       <Transition target = "On first Floor"/>
  10.     </PseudoState>
  11.  
  12.     <State name = "On first Floor">
  13.       <Transition target = "Moving up">
  14.         <TransitionLabel>
  15.           <Event name = "go up">
  16.             <Parameter NAME = "floor"/>
  17.           </Event>
  18.         </TransitionLabel>
  19.       </Transition>
  20.     </State>
  21.  
  22.     <State name = "Moving up">
  23.       <ActionSequence>
  24.         <Event name = "do"/>
  25.         <Action>moving to the target floor</Action>
  26.       </ActionSequence>
  27.       <Transition target = "Idle">
  28.         <TransitionLabel>
  29.           <Event name = "arrived"/>
  30.         </TransitionLabel>
  31.       </Transition>
  32.     </State>
  33.     
  34.     <State name = "Idle">
  35.       <ActionSequence>
  36.         <Event name = "do"/>
  37.         <Action>increase timer</Action>
  38.       </ActionSequence>
  39.       <Transition target = "Moving down">
  40.         <TransitionLabel>
  41.           <Event name = "go down">
  42.             <Parameter NAME = "floor"/>
  43.           </Event>
  44.         </TransitionLabel>
  45.       </Transition>
  46.       <Transition target = "On first floor">
  47.         <TransitionLabel>
  48.           <Event name = "go down">
  49.             <Parameter NAME = "first_floor"/>
  50.           </Event>
  51.           <Guard>timer = time_out</Guard>
  52.           <SendClause>test</SendClause>
  53.         </TransitionLabel>
  54.       </Transition>
  55.       <Transition target = "Moving up">
  56.         <TransitionLabel>
  57.           <Event name = "go up">
  58.             <Parameter NAME = "floor"/>
  59.           </Event>
  60.         </TransitionLabel>
  61.       </Transition>
  62.     </State>
  63.     
  64.     <State name = "Moving down">
  65.       <ActionSequence>
  66.         <Event name = "do"/>
  67.         <Action>moving to the target floor</Action>
  68.       </ActionSequence>
  69.       <Transition target = "Idle">
  70.         <TransitionLabel>
  71.           <Event name = "arrived"/>
  72.         </TransitionLabel>
  73.       </Transition>
  74.     </State>
  75.     
  76.   </StatechartDiagram>
  77. </Package>
  78. </Model>
  79.